import { UploadFormCommon } from '@/components/UploadForm';

export const getCalibrateSchemas = (): CollapseFormAPI.SchemasProps[] => [
  {
    key: 'calibrate-info',
    title: '基本信息',
    children: [
      {
        label: '定标标题',
        field: 'calibrateName',
        component: 'Input',
        required: true,
      },
      {
        label: '预估总价',
        field: 'expectSum',
        component: 'Input',
        required: true,
        addonAfter: '元',
        span: 12,
      },
      {
        label: '报价税点',
        field: 'expectSum1',
        component: 'Input',
        span: 12,
      },
      {
        label: '计划采购时间',
        field: 'expectTime',
        component: 'DatePicker',
        span: 12,
      },
      {
        label: '交付日期',
        field: 'deliveryTime',
        component: 'DatePicker',
        span: 12,
      },
      {
        label: '定标汇报资料',
        field: 'attachURL',
        component: 'Render',
        slotRender: (text: string) => {
          return (
            <UploadFormCommon
              form={'form'}
              label="定标汇报资料"
              fileFormName={'attachURL'}
              spanCol={24}
              inRowProportion={24}
              name={'imageInfo'}
              required={false}
              accept={'.xls|.pdf|.doc|.docx'}
              url={''}
              downloadUrl={''}
              fileFormDelName={'delLicenceUrl'}
              delFunc={() => {}}
              maxFile={1}
              defaultFiles={text}
            >
              上传附件
            </UploadFormCommon>
          );
        },
      },
      {
        label: '定标内容',
        field: 'calibrateContent',
        component: 'InputTextArea',
        required: true,
        maxLength: 600,
        showCount: true,
        autoSize: {
          minRows: 3,
          maxRows: 5,
        },
      },
    ],
  },
];
